package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardCompleteRequest struct {
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
	/*
	   完结次数     */
	CompleteCount *int64 `json:"complete_count,omitempty" required:"false" `
	/*
	   扩展信息     */
	ExtJson *string `json:"ext_json,omitempty" required:"false" `
	/*
	   工单完结号     */
	Sequence *int64 `json:"sequence,omitempty" required:"false" `
	/*
	   核销地纬度     */
	Latitude *string `json:"latitude,omitempty" required:"false" `
	/*
	   核销地经度     */
	Longitude *string `json:"longitude,omitempty" required:"false" `
	/*
	   图片地址回传集合     */
	PicUrls *[]string `json:"pic_urls,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardCompleteRequest) SetWorkcardId(v int64) *TmallServicecenterWorkcardCompleteRequest {
	s.WorkcardId = &v
	return s
}
func (s *TmallServicecenterWorkcardCompleteRequest) SetCompleteCount(v int64) *TmallServicecenterWorkcardCompleteRequest {
	s.CompleteCount = &v
	return s
}
func (s *TmallServicecenterWorkcardCompleteRequest) SetExtJson(v string) *TmallServicecenterWorkcardCompleteRequest {
	s.ExtJson = &v
	return s
}
func (s *TmallServicecenterWorkcardCompleteRequest) SetSequence(v int64) *TmallServicecenterWorkcardCompleteRequest {
	s.Sequence = &v
	return s
}
func (s *TmallServicecenterWorkcardCompleteRequest) SetLatitude(v string) *TmallServicecenterWorkcardCompleteRequest {
	s.Latitude = &v
	return s
}
func (s *TmallServicecenterWorkcardCompleteRequest) SetLongitude(v string) *TmallServicecenterWorkcardCompleteRequest {
	s.Longitude = &v
	return s
}
func (s *TmallServicecenterWorkcardCompleteRequest) SetPicUrls(v []string) *TmallServicecenterWorkcardCompleteRequest {
	s.PicUrls = &v
	return s
}

func (req *TmallServicecenterWorkcardCompleteRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.CompleteCount != nil {
		paramMap["complete_count"] = *req.CompleteCount
	}
	if req.ExtJson != nil {
		paramMap["ext_json"] = *req.ExtJson
	}
	if req.Sequence != nil {
		paramMap["sequence"] = *req.Sequence
	}
	if req.Latitude != nil {
		paramMap["latitude"] = *req.Latitude
	}
	if req.Longitude != nil {
		paramMap["longitude"] = *req.Longitude
	}
	if req.PicUrls != nil {
		paramMap["pic_urls"] = util.ConvertBasicList(*req.PicUrls)
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardCompleteRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
